<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
import { fullscreenToggel, listenfullscreen } from "@/utils/util";
export default {
  mounted() {
    listenfullscreen(this.setScreen);
    window.addEventListener("keydown", this.handleKeydown);
  },
  methods: {
    handleScreen() {
      fullscreenToggel();
    },
    setScreen() {
      this.$store.commit("SET_FULLSCREN");
    },
    handleKeydown(event) {
      if (event.key === "F11") {
        event.preventDefault();
        this.handleScreen();
      }
    },
  },
};
</script>
